The present invention relates generally to computer operating systems and applications, and, more particularly, to configuring parameters.
Many aspects of a computer""s behavior can be configured by setting parameters in an initialization file that the computer executes during start up. Similarly, an application""s configuration parameters can be set in an initialization file executed when that application is started. The universe of possible configuration options is expanding dramatically and with it the length and complexity of initialization files. Correctly setting up an initialization file so that the computer or application acts in a desired manner becomes more difficult and time consuming with the increase in the number of configuration options and with the increasing interaction among those options.
Difficult as configuration is for one machine or one application, it is exponentially more difficult to configure multiple computers and multiple applications so that they interact with their environment and with each other in a predictable fashion. With multiple computers, different sets of configurable parameters are set to reflect different levels in each computer""s xe2x80x9chierarchy of belonging.xe2x80x9d That is, some parameters, the most general, are the same for all computers, some may reflect particular choices made by the corporation that owns the computer, some parameters accommodate the particular needs of a department within the corporation, and some parameters are specific to the particular user of the computer. Different system administrators may be responsible for setting the parameters pertaining to different levels in the hierarchy of belonging. Often, the same parameter will be given different values during configuration of different levels of the hierarchy, leading to confusion and unpredictable behavior. It becomes extremely difficult for any one person to correctly initialize all of the parameters in a computer""s configuration. Similar considerations apply to configuring applications.
Adding to the difficulty of creating correct configurations, a configuration may change with time. The computer may be moved, changing its place in the hierarchy of belonging. It may be reassigned to a different function. Servers used by an application may change. Computers and applications may be used in an environment, such as a testing environment, in which their configurations may be changed every time they operate.
There is a need to contain the burgeoning complexity of configuration, a way to divide the labor of the entire configuration job into subtasks so that each task may be performed competently, and a way to integrate the work of the various subtasks into a unified whole.
The above problems and shortcomings, and others, are addressed by the present invention, which can be understood by referring to the specification, drawings, and claims. The present invention is a configuration system that applies rules of precedence to evaluate parameters in the context of multiple sections within a configuration file and in the context of multiple configuration files. The invention brings together the multiple sections and multiple files into a unified whole.
The precedential order of sections and files may be set by a user and special section names used to override default precedential rules. If a parameter is set multiple times at different levels in the hierarchy of belonging, its final value reflects the value set at the level most closely concerned with the setting of the parameter.
To accommodate increased interactions among configuration parameters, the value of a parameter can be set from an environmental variable or from the value of another parameter. If a parameter""s value depends upon the value of another parameter, that second parameter is recursively evaluated using the same precedential rules.